home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LT_DisposeMenu.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  576b  |  34 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. **
  6. **  :ts=4
  7. */
  8.  
  9. #include "gtlayout_global.h"
  10.  
  11. #ifdef DO_MENUS
  12.  
  13.     /* LT_DisposeMenu(struct Menu *Menu):
  14.      *
  15.      *    Dispose of the menu we created below.
  16.      */
  17.  
  18. VOID LIBENT
  19. LT_DisposeMenu(REG(a0) struct Menu *Menu)
  20. {
  21.     if(Menu)
  22.     {
  23.         struct RootMenu *Root = (struct RootMenu *)((ULONG)Menu - offsetof(struct RootMenu,Menu));
  24.  
  25.         FreeScreenDrawInfo(Root -> Screen,Root -> DrawInfo);
  26.  
  27.         CloseFont(Root -> Font);
  28.  
  29.         AsmDeletePool(Root -> Pool,SysBase);
  30.     }
  31. }
  32.  
  33. #endif    /* DO_MENUS */
  34.